//
//  HSCommonFile.swift
//  HomeSchoolDemo
//
//  Created by rimi on 16/9/27.
//  Copyright © 2016年 黄华强. All rights reserved.
//

import UIKit

let screenW = UIScreen.main.bounds.width
let screenH = UIScreen.main.bounds.height

let replayViewW: CGFloat = screenW - (50 + 8 * 4)

///服务器IP地址KEY
let hhq_ipKey: String = "ipText"
///只读存储型属性
var baseURLString: String? {
    guard let saveIP = UserDefaults.standard.value(forKey: hhq_ipKey) as? String else {
        return nil
    }
    return saveIP + "zao/interface/"
}//"http://120.24.57.38/new/zao/interface/"

///登录状态key
let isLogin: String = "isLogin"
///获得用户信息的保存路径
let saveUserInfoPath = (NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).last ?? "") + "/userInfoFile.plist"
//保证可以刷新
var userInfo:NSDictionary {
    return NSDictionary(contentsOfFile: saveUserInfoPath)?["data"] as! NSDictionary
}
